<script type="text/javascript">
    $("#cat_product").empty();
</script>

<?php
include 'mySQLConnect.php';
$sql = "SELECT * FROM category ORDER BY id ASC";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
    ?>
    <script type="text/javascript">
        $("#cat_product").append('<option value=<?php echo $row['id'];?>><?php echo urldecode($row['cat_name']);?></option>');
    </script>
<?php
}

include 'mySQLClose.php';
?>